<!DOCTYPE html>
<html>

<head>
    <title>Flat Admin - Bootstrap Themes</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/static/css/animate.css">
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap-select.min.css">
    <link rel="stylesheet" type="text/css" href="/static/css/awesome-bootstrap-checkbox.css">
    <link rel="stylesheet" type="text/css" href="/static/css/style.css">
    <link rel="stylesheet" type="text/css" href="/static/css/theme.css">

    <script type="text/javascript" src="/static/js/jquery-2.1.3.min.js"></script>

    <script type="text/javascript" src="/static/js/bootstrap-select.min.js"></script>
    <script type="text/javascript" src="/static/js/main.js"></script>

     <script type="text/javascript">
         function check(){
             var password= document.getElementById('Password');
             var password=password.value;
             var password2= document.getElementById('Password2');
             var password2=password2.value;
      var name= document.getElementById('Name');
      var name=name.value;
      var sex= document.getElementById('Sex');
      var sex=sex.value;
      var age= document.getElementById('Age');
      var age=age.value;

      if (!name){  //如果用户没有输入名字
          alert('请输入姓名！');
          return false;
      }
        
       if(!sex){ //如果用户没有输入用户性别
          alert('请输入用户性别！');
          return false;
      }
       if(!age){ //如果用户没有输入用户年龄
          alert('请输入用户年龄！');
          return false;
      }
       if(password!=password2){
           alert('确认密码和密码不一致！')
           return false;
       }

     
      return true;
   }

    </script>

</head>

<body class="flat-blue sidebar-collapse">
    <div class="sidebar">
        <div class="menu-control toggle-sidebar">
            <a class="navbar-brand" href="#"><i class="fa fa-bar-chart"></i> Flat Admin</a>
            <i class="fa fa-bars navicon"></i>
        </div>
        <ul class="menu">
                        <li class="submenu">
                <a href="/index">
                    <div>
                        <i class="menu-icon fa fa-th-large"></i>
                        <span class="menu-title">主页</span>
                    </div>
                </a>
            </li>

            <li class="submenu">
                <a href="/getAllStudents">
                    <div>
                        <i class="menu-icon fa fa-table"></i>
                        <span class="menu-title">学生信息Table</span>
                    </div>
                </a>
            </li>
            <li class="submenu">
                <a href="/updateStudent?id={{.list.Id}}" class="active">
                    <div>
                        <i class="menu-icon fa fa-file-text-o"></i>
                        <span class="menu-title">修改学生信息</span>
                    </div>
                </a>
            </li>


                </ul>
            </li>
        </ul>
    </div>
    <div class="content-container">
        <nav class="navbar navbar-default">
            <div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="#"><i class="fa fa-bar-chart"></i> Flat Admin</a>
                    </div>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa fa-comments"></i> 0</a>
                            <ul class="dropdown-menu">
                                <li class="dropdown-title-bar">
                                    Notification ( 0 )
                                </li>
                                <li class="message">
                                    No new notification
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown notification-alert">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-exclamation-circle"></i> 3</a>
                            <ul class="dropdown-menu">
                                <li class="dropdown-title-bar">
                                    Notification ( 3 )
                                </li>
                                <li>
                                    <ul class="notification-list">
                                        <li>
                                            <a href="#">
                                                <div class="noti-icon noti-alert">
                                                    <i class="fa fa-exclamation-circle fa-2x"></i>
                                                </div>
                                                <div class="noti-message">1 new registration</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <div class="noti-icon noti-success">
                                                    <i class="fa fa-check fa-2x"></i>
                                                </div>
                                                <div class="noti-message">3 new orders</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <div class="noti-icon noti-primary">
                                                    <i class="fa fa-comments fa-2x"></i>
                                                </div>
                                                <div class="noti-message">2 customers messages</div>
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{.userName}}<span class="caret"></span></a>
                            <ul class="dropdown-menu user-info">
                                <li class="dropdown-title-bar">
                                    <img src="/static/images/profile.jpg" class="profile-img">
                                </li>
                                <li>
                                    <div class="navbar-login">
                                        <h4 class="user-name">{{.userName}}</h4>
                                        <p>emily_hart@email.com</p>
                                        <div class="btn-group margin-bottom-2x" role="group">
                                            <button type="button" class="btn btn-default"><i class="fa fa-user"></i><a href="/index">Profile</a></button>
                                            <button type="button" class="btn btn-default"><i class="fa fa-sign-out"></i><a href="/logout">Logout</a></button>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </div>
            <!-- /.container-fluid -->
        </nav>
        <div class="container-fluid">
            <div class="row">

            </div>
            <div class="row">
                <div class="col-xs-12">

                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div class="content-block">
                        <div class="block-title">修改学生信息</div>
                        <form class="form-horizontal" action="/studentUpdating" method="post" onsubmit="return check()">
                            <div class="block-content">
                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label" >Id</label>

                                    <div class="col-sm-9" >


                                        <input type="hidden" class="form-control" name="Id" value="{{.list.Id}}">

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label" >密码</label>

                                    <div class="col-sm-9" >


                                        <input type="password" class="form-control" name="Password" id="Password" value="{{.list.Password}}">

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label" >确认密码</label>

                                    <div class="col-sm-9" >


                                        <input type="password" class="form-control" id="Password2" value="">

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label" >姓名</label>
                                    <div class="col-sm-9">

                                            <input type="text" class="form-control" id="Name" name="Name" value="{{.list.Name}}">

                                    </div>
                                </div>
                                  <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label" >性别</label>
                                    <div class="col-sm-9">

                                        <select class="form-control" id="Sex" name="Sex">
                                            <option value="男">男</option>
                                            <option value="女">女</option>
                                        </select>

                                    </div>
                                </div>
                                  <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-3 control-label">年龄</label>
                                    <div class="col-sm-9">

                                            <input type="text" class="form-control" id="Age" name="Age" value="{{.list.Age}}">

                                    </div>
                                </div>

                            </div>
                            <div class="block-footer">
                                <div class="form-group">
                                    <div class="col-sm-offset-3 col-sm-9">

                                        <input type="submit" class="btn btn-primary" >
                                        <!--
                                        <a href="/post" class="btn btn-primary" >提交</a>
                                        -->
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                
</body>

</html>
